package com.hspedu.newData.每日一题;

/**
 * @Author: yh
 * @description:
 * @CreateTime: 2025-05-11
 * @Version: 1.0
 */

public class LC1550存在三个奇数的数组 {

    public boolean threeConsecutiveOdds(int[] arr) {

        int count = 0;

        for (int i = 0; i < arr.length; i++) {
            if (arr[i] % 2 != 0){
                count++;
            }else {
                count = 0;
            }
            if (count == 3){
                return true;
            }
        }
        return false;
    }

}
